﻿<template>
    <full-screen-dialog
        :title="titleMap[mode]"
        v-model="visible"
        :width="900"
        destroy-on-close
        :close-on-click-modal="false"
        @closed="$emit('closed')"
    >
        <el-form
            :model="entityObj"
            :rules="rules"
            ref="dialogForm"
            label-width="100px"
        >
            <el-row>
                <el-col :span="24">
                    <el-form-item label-width="120px" label="公告标题：">
                        {{ entityObj.bulletinTitle }}
                    </el-form-item>
                </el-col>
               
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label-width="120px" label="公告内容：">
                       {{ entityObj.bulletinBody }}
                    </el-form-item>
                </el-col>
               
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label-width="120px" label="通知机构：">
                        <el-tag v-for="item in entityObj.orgNames.split(';')" :key="item" type="primary" effect="plain">
                        {{ item }}
                        </el-tag>

                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label-width="120px" label="发布时间：">
                        {{ entityObj.createTime }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label-width="120px" label="已读人数：">
                        <el-table :data="entityObj.bulletinAccounts" style="width: 100%">
                            <el-table-column prop="accountName" label="账户名称"  />
                            <el-table-column prop="mobile" label="手机号" />
                            <el-table-column prop="orgType" label="机构类型" width="100" />
                            <el-table-column prop="orgName" label="机构名称"  />
                            <el-table-column prop="createTime" label="已读时间" width="180" />
                        </el-table>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <template #footer>
            <el-button @click="visible = false">关 闭</el-button>
            
        </template>
      
       


    </full-screen-dialog>
</template>

<script>
import tool from "@/utils/tool";
export default {
    emits: ["success", "closed"],
    data() {
        return {
            mode: "Add",
            titleMap: {
                Show: "公告效果",
            },
            entityObj: {
               
            },
            visible: false,
            isSaveing: false,
            needSaveFlag: false,
            //验证规则
            rules: {
               
            },
           
          
        };
    },
   
    watch: {
            
	},
    methods: {
        //显示=
        open(mode = "Add") {
            this.mode = mode;
            this.visible = true;
            
            return this;
        },
     
      
        //表单注入数据
        async setData(data) {
            console.log(" data",data);
           
           
            this.entityObj=data
            
        },
      
       
       
    },
    async mounted() {
        
       
        
    },
};
</script>

